<template>
	<view class="mapMonitorPage">
		<view v-for="(item, index) in OBJDate" :key="index">
			<view class="title">{{ item.title }}</view>
			<view class="content" v-for="(arr, j) in item.content" :key="j">{{ arr }}</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			OBJDate: null
		};
	},
	onLoad: function(options) {
		if (options.type == 1) {
			uni.setNavigationBarTitle({
				title: '土壤修复方案'
			});
			this.trScheme();
		} else {
			uni.setNavigationBarTitle({
				title: '植物修复方案'
			});
			this.zbScheme();
		}
	},
	methods: {
		/*/appShow/base/zbScheme*/
		zbScheme() {
			this.$$.request(
				{
					url: this.config.zbScheme,
					method: 'GET',
					data: {}
				},
				true,
				true
			)
				.then(res => {
					console.log(res);
					if (res.code == 2000) {
						this.OBJDate = res.data.datas;
					}
				})
				.catch(error => {
					console.log('程序错误', error.message);
				})
				.finally(() => {
					console.log('complate');
				});
		},
		trScheme() {
			this.$$.request(
				{
					url: this.config.trScheme,
					method: 'GET',
					data: {}
				},
				true,
				true
			)
				.then(res => {
					console.log(res.data.datas);
					if (res.code == 2000) {
						this.OBJDate = res.data.datas;
					}
				})
				.catch(error => {
					console.log('程序错误', error.message);
				})
				.finally(() => {
					console.log('complate');
				});
		}
	}
};
</script>

<style lang="scss" scoped>
.mapMonitorPage {
	box-sizing: border-box;
	padding: 50rpx 40rpx;
	.title{
		font-size: 32rpx;
		font-weight: bold;
		color: #333333;
		line-height: 1;
		margin-bottom: 42rpx;
	}
	.content{
		font-size: 28rpx;
		font-weight: 400;
		color: #333333;
		line-height: 48rpx;
		margin-bottom: 50rpx;
	}
}
</style>
